﻿var debugWidth = 300;
var debugHeight = 300;
var debugWindow;

var Debug =
{
    debugCreateWindow: function() 
    {
        debugWindow = Common.getAlertWindow("DEBUG", "<div id=\"_DEBUG\" style=\"width:100%; height:300px; background-color:#EEEEEE; overflow:scroll; text-align:left\"></DIV>", "", "", false, false, false, "floatingWindowDefault");
        debugWindow.show(false);
    },

    debugClear : function()
    {
        var divDebug = document.getElementById(this.id + "_DEBUG");
        if(divDebug)
            divDebug.innerHTML = "";
    },

    debug : function(newMessage)
    {
        var divDebug = document.getElementById("_DEBUG");
        if(divDebug)
            divDebug.innerHTML += newMessage + "<BR>";
    }
}

Common.addEventListener(window, "load", Debug.debugCreateWindow, false);